function go2(){
    
    let c = document.getElementById('lesson2')
    let ctx = c.getContext('2d')

    // 画二次贝塞尔曲线,需要3个点
    //ctx.moveTo(355,10) 起点
    // ctx.quadraticCurveTo(x2,y2,x3,y3)   //2点和终点

    // 画三次贝塞尔曲线,需要4个点
    //ctx.moveTo(355,10) 起点
    //ctx.bezierCurveTo(x2,y2,x3,y3,x3,y3) //2点,3点和终点
    let x=150,y=30
    let startP = ()=>[x,y]
    let p2 = ()=>[x+50,y-50]
    let pl2 = ()=>[x-50,y-50]
    let p3 = ()=>[x+100,y]
    let pl3 = ()=>[x-100,y]
    let endP = ()=>[x,y+50]
    ctx.moveTo(...startP()) 
    ctx.bezierCurveTo(...p2(),...p3(),...endP())
    ctx.moveTo(...startP()) 
    ctx.bezierCurveTo(...pl2(),...pl3(),...endP())
    ctx.fillStyle = "#ff00ff"      //  控制颜色
    ctx.fill()

    
    //.设置阴影
    ctx.shadowOffsetX =10;ctx.shadowOffsetY = 10;
    ctx.shadowBlur =5;
    ctx.shadowColor ="rgba(155,100,100,1)"

    ctx.fill()
    
  
    x=300
    var heartPath = new Path2D();  
    heartPath.moveTo(...startP());// 2个控制点、1个终点
    heartPath.bezierCurveTo(...p2(),...p3(),...endP())
    heartPath.moveTo(...startP()) 
    heartPath.bezierCurveTo(...pl2(),...pl3(),...endP())
    ctx.strokeStyle = "#ff00ff"      //  控制颜色
    ctx.stroke(heartPath);
    
    // 创建一条折线
    var polyline =new Path2D("M10 10 h 40 v 40 h -40 z");  //M移动, h水平, v垂直, z闭合线段;  小写是相对上个点位置, 大写是绝对位置.
    ctx.stroke(polyline);
} 